local skel = fk.CreateSkill {
  name = "emo__qiyin",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["emo__qiyin"] = "契音",
  [":emo__qiyin"] = "锁定技，其他角色使用“水域”牌后，你也执行“水域”效果，若其体力上限大于你，你增加一点。",

  ["$emo__qiyin1"] = "给我一首歌的时间。",
  ["$emo__qiyin2"] = "为你歌唱！",
}


skel:addEffect(fk.CardUseFinished, {
  anim_type = "defensive",
  can_trigger = function(self, event, target, player, data)
    if target ~= player and player:hasSkill(skel.name) then
      for _, id in ipairs(Card:getIdList(data.card)) do
        if Fk:getCardById(id):getMark("@@emo__shuiyu") ~= 0 then
          return true
        end
      end
    end
  end,
  on_use = function (self, event, target, player, data)
    local room = player.room
    if player:isWounded() then
      room:recover { num = 1, skillName = skel.name, who = player, recoverBy = player }
    else
      player:drawCards(1, skel.name)
      if player.dead or player:isKongcheng() then return end
      local cards = room:askToCards(player, {
        min_num = 1, max_num = 1, include_equip = false, skill_name = skel.name, cancelable = false,
        prompt = "#emo__shuiyu-put"
      })
      room:moveCardTo(cards, Card.DrawPile, nil, fk.ReasonPut, skel.name, nil, false, player)
    end
    if not player.dead and target.maxHp > player.maxHp then
      room:changeMaxHp(player, 1)
    end
  end,
})

return skel
